<head>
  <script type="text/javascript">
	//<![CDATA[
		window.addEvent('domready', function() {
			myCal1 = new Calendar({ date1: 'd/m/Y' }, { blocked: ['12-15,20-22,25 2-5 2008'], direction: 0, tweak: { x: 6, y: 0 } });
			myCal1 = new Calendar({ date2: 'd/m/Y' }, { blocked: ['12-15,20-22,25 2-5 2008'], direction: 0, tweak: { x: 6, y: 0 } });
		});
	//]]>
  </script>
</head>

<div class="admin_left actions">

    <h3 style="font-size:20px;">Manage more</h3>

    <ul>
        <li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('List Groups'), array('controller' => 'groups', 'action' => 'index'),array('class' => 'consistentButton')); ?> </li>
        <li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('New Group'), array('controller' => 'groups', 'action' => 'add'),array('class' => 'consistentButton')); ?> </li>
    </ul>
</div>

<div class="admin_right index" >


        <?php if ($current_customer['group_id'] == '1'): ?>
            <form name="create-form" method="post" action="SalesReport">
                <h2><?php echo __('Report'); ?></h2>

                <legend>New report </legend>

                <?php echo $this->Form->input('Report type:', array(
                    'options' => array("Items", "Sales"),
                    'empty' => '( ---- select -----)'
                ));
                ?>

	            <label for="date1">From: </label>
                <input id="date1" class="calendar" type="text" name="date1" readonly="">

                <label for="date2">To: </label>
                <input id="date2" class="calendar" type="text" name="date2" readonly="">


                    <input type='submit' name='button' value='submit' class="btn btn-info">


                <div id="reportResult">
                </div>
            </form>
        <?php endif; ?>
</div>



<script type="text/javascript">

$(document).ready(function(){

    //When clicking "Create Report"
    $("#createReport").click(function(){
        //check whether report type and dates are selected
            //if no, show error message
            //if yes, take the values
                if{$("#id").val(1)


        //then generate the report using the values as parameters
    });

}
</script>
